package a.j.b;

import a.c.ab;
import a.c.bb;
import a.c.d;
import a.c.e;
import a.c.w;
import a.d.u;
import a.j.a.b;
import a.j.a.j;
import a.j.*;
import a.j.g;
import a.j.h;

import java.awt.geom.Rectangle2D;
import java.util.*;

import a.d.u;
import a.j.b.f;
import a.j.a.j;

public class m
{
  private boolean a = true;
  public static boolean b;
  
  private g a(f paramf)
  {
    e locale = paramf.n();
    if (f.Wb == 0) {}
    return locale == null ? null : (g)locale.g();
  }
  
  private boolean b(f paramf)
  {
    int i = f.Wb;
    b localb = paramf.K();
    if ((i != 0) || (localb != null)) {
      if (i != 0) {}
    }
    return localb.e();
  }
  
  private void a(f paramf, boolean paramBoolean)
  {
    b localb = paramf.K();
    if ((f.Wb != 0) || (localb != null)) {
      localb.a(paramBoolean);
    }
  }
  
  public void a(g paramg, bb parambb, h paramh, double paramDouble1, double paramDouble2)
  {
    int i = f.Wb;
    boolean bool = f.Vb;
    Object localObject;
    if (i == 0) {
      if (!parambb.isEmpty())
      {
        localObject = parambb.l();
        do
        {
          if (!((w)localObject).e()) {
            break;
          }
          paramg.w(((w)localObject).d()).d(paramDouble1, paramDouble2);
          ((w)localObject).f();
          if ((i == 0) && (bool)) {
            return;
          }
        } while (!bool);
      }
    }
    if ((i == 0) && ((i != 0) || (!paramh.isEmpty())))
    {
      localObject = paramh.m();
      do
      {
        if (!((fb)localObject).e()) {
          break;
        }
        eb localeb = ((fb)localObject).a();
        localeb.a(localeb.b() + paramDouble1, localeb.c() + paramDouble2);
        ((fb)localObject).f();
      } while (!bool);
    }
  }
  
  public void a(e parame, Rectangle2D paramRectangle2D, Collection paramCollection)
  {
    int i = f.Wb;
    if (i == 0) {}
    g localg = parame == null ? null : (g)parame.g();
    if (i == 0) {}
    j localj = localg == null ? null : j.a(localg);
    if ((localj != null) && (paramRectangle2D != null) && (paramCollection != null)) {
      a(localj, parame, paramRectangle2D, paramCollection);
    }
  }
  
  public void a(g paramg, Rectangle2D paramRectangle2D, Collection paramCollection)
  {
    int i = f.Wb;
    boolean bool = f.Vb;
    if ((paramg != null) && (paramRectangle2D != null) && (paramCollection != null))
    {
      a.c.m localm = paramg.w();
      label120:
      do
      {
        if (!localm.e()) {
          break;
        }
        d locald = localm.a();
        fb localfb = paramg.t(locald).o();
        do
        {
          do
          {
            if (!localfb.e()) {
              break label120;
            }
            eb localeb = localfb.a();
            if (bool) {
              break;
            }
            if (paramRectangle2D.contains(localeb.b(), localeb.c())) {
              paramCollection.add(localeb);
            }
            localfb.f();
          } while (!bool);
          localm.f();
        } while (i != 0);
      } while (!bool);
    }
  }
  
  private void a(e parame, Rectangle2D paramRectangle2D, Collection paramCollection1, Collection paramCollection2)
  {
    int i = f.Wb;
    boolean bool = f.Vb;
    a(parame, paramRectangle2D, paramCollection1);
    if (i == 0) {}
    g localg = parame == null ? null : (g)parame.g();
    if (i == 0)
    {
      if (a()) {
        a(localg, paramRectangle2D, paramCollection2);
      }
    }
    else if (!bool) {
      return;
    }
    if ((localg != null) && (paramRectangle2D != null) && ((i != 0) || ((paramCollection1 != null) && (paramCollection2 != null))))
    {
      HashSet localHashSet = new HashSet(paramCollection1);
      a.c.m localm = localg.w();
      label235:
      do
      {
        do
        {
          if (!localm.e()) {
            return;
          }
          d locald = localm.a();
          if (i != 0) {
            break;
          }
          if (localHashSet.contains(locald.e()))
          {
            if (i != 0) {
              break;
            }
            if (localHashSet.contains(locald.f()))
            {
              fb localfb = localg.t(locald).o();
              do
              {
                if (!localfb.e()) {
                  break label235;
                }
                eb localeb = localfb.a();
                if (bool) {
                  break;
                }
                if (paramRectangle2D.contains(localeb.b(), localeb.c())) {
                  paramCollection2.add(localeb);
                }
                localfb.f();
              } while (!bool);
            }
          }
          localm.f();
        } while (i != 0);
      } while (!bool);
    }
  }
  
  private void a(j paramj, e parame, Rectangle2D paramRectangle2D, Collection paramCollection)
  {
    int j = f.Wb;
    boolean bool = f.Vb;
    g localg = (g)parame.g();
    w localw = paramj.r(parame);
    label161:
    do
    {
      if (!localw.e()) {
        break;
      }
      e locale = localw.d();
      Object localObject1;
      if ((j != 0) || (paramj.m(locale)))
      {
        localObject1 = paramj.r(locale);
        Object localObject2;
        if (((w)localObject1).e())
        {
          localObject2 = new LinkedHashSet();
          a(paramj, locale, paramRectangle2D, (Collection)localObject2);
          int i = 1;
          do
          {
            if (!((w)localObject1).e()) {
              break;
            }
            if (bool) {
              break label161;
            }
            if (!((LinkedHashSet)localObject2).contains(localw.d()))
            {
              i = 0;
              if (j == 0) {
                if (!bool) {
                  break;
                }
              }
            }
            else
            {
              ((w)localObject1).f();
            }
          } while (!bool);
          if (j == 0)
          {
            if (i != 0) {
              paramCollection.add(locale);
            }
            paramCollection.addAll((Collection)localObject2);
          }
          if (j != 0) {
            continue;
          }
          if (!bool) {}
        }
        else
        {
          localObject2 = localg.w(locale);
          if (j != 0) {
            continue;
          }
          if (paramRectangle2D.contains(((ld)localObject2).A(), ((ld)localObject2).B()))
          {
            paramCollection.add(locale);
            if (j != 0) {
              continue;
            }
            if (!bool) {}
          }
        }
      }
      else
      {
        localObject1 = localg.w(locale);
        if (j != 0) {
          continue;
        }
        if (paramRectangle2D.contains(((ld)localObject1).A(), ((ld)localObject1).B())) {
          paramCollection.add(locale);
        }
      }
      localw.f();
    } while (!bool);
  }
  
  public void a(f.n_ paramn_, f.o_ paramo_)
  {
    int i = f.Wb;
    f localf1 = f.d(paramn_);
    g localg = a(localf1);
    if (i == 0) {
      if (localg == null)
      {
        boolean bool = b(localf1);
        if (i == 0) {
          if (bool) {
            a(localf1, false);
          }
        }
        try
        {
          paramn_.a(paramo_);
          if (i != 0) {}
        }
        finally
        {
          if (bool) {
            a(localf1, true);
          }
        }
      }
    }
    localg.z();
    try
    {
      e locale = localf1.n();
      localg.a(new bb(locale).l());
      ld localld = a(localg, locale);
      if (i == 0) {
        if (localld == localf1)
        {
          a(localf1, paramn_, paramo_);
          if (i != 0) {
            return;
          }
          if (!f.Vb) {
            break label209;
          }
        }
      }
      if ((i != 0) || ((localld instanceof f)))
      {
        f localf2 = (f)localld;
        ArrayList localArrayList = new ArrayList();
        a(localf2, a(paramn_, localf2, localArrayList), a(paramo_, localf2, localArrayList));
      }
    }
    finally
    {
      label209:
      localg.A();
    }
  }
  
  private void a(f paramf, f.n_ paramn_, f.o_ paramo_)
  {
    int i = f.Wb;
    boolean bool4 = f.Vb;
    boolean bool1 = b(paramf);
    if (bool1) {
      a(paramf, false);
    }
    try
    {
      bb localbb1 = new bb();
      h localh1 = new h();
      Rectangle2D localRectangle2D = paramn_.h();
      a(paramf.n(), localRectangle2D, localbb1, localh1);
      double d1 = paramf.rb();
      bb localbb2 = new bb();
      h localh2 = new h();
      a(paramf.n(), new Rectangle2D.Double(paramf.a(), paramf.b() + d1, paramf.c(), paramf.d() - d1), localbb2, localh2);
      f.o_ localo_ = paramn_.a();
      double d2 = 0.0D;
      boolean bool2 = false;
      double d3 = 0.0D;
      if (i == 0) {
        if ((localo_ instanceof f.n_))
        {
          localObject1 = (f.n_)localo_;
          d2 = ((f.n_)localObject1).g();
          if (i == 0) {}
          bool2 = ((f.n_)localObject1).k() == 1;
        }
      }
      Object localObject1 = paramo_;
      double d4 = 0.0D;
      if ((i != 0) || ((localObject1 instanceof f.n_))) {
        d4 = ((f.n_)localObject1).g();
      }
      double d5 = paramn_.g();
      paramn_.a((f.o_)localObject1);
      double d6 = paramn_.g();
      if (i == 0) {
        if ((localo_ instanceof f.r_))
        {
          d3 = d5;
          if (i != 0) {
            break label313;
          }
          if (!bool4) {
            break label312;
          }
        }
      }
      if (i == 0) {
        if ((localo_ instanceof f.n_)) {
          d3 = d2 - ((f.n_)localo_).g();
        }
      }
      label312:
      label313:
      boolean bool3 = false;
      double d7 = 0.0D;
      if (i == 0) {
        if ((localObject1 instanceof f.r_)) {
          d7 = d6;
        }
      }
      if ((i != 0) || ((bool4) && ((i != 0) || ((localObject1 instanceof f.n_)))))
      {
        localObject2 = (f.n_)localObject1;
        d7 = ((f.n_)localObject2).g() - d4;
        if (i == 0) {}
        bool3 = ((f.n_)localObject2).k() == 1;
      }
      Object localObject2 = paramn_.h();
      a(paramf, localbb1, localh1, localObject1, d6, bool2, bool3, d3, d7, (Rectangle2D)localObject2, localRectangle2D, true);
      double d8 = paramf.rb();
      if (i == 0) {
        if (d8 != d1) {
          a(paramf, localbb2, localh2, d8 - d1, false);
        }
      }
    }
    finally
    {
      if (bool1) {
        a(paramf, true);
      }
    }
  }
  
  public void a(f.p_ paramp_, f.q_ paramq_)
  {
    int i = f.Wb;
    f localf1 = f.d(paramp_);
    g localg = a(localf1);
    if (i == 0) {
      if (localg == null)
      {
        boolean bool = b(localf1);
        if (i == 0) {
          if (bool) {
            a(localf1, false);
          }
        }
        try
        {
          paramp_.a(paramq_);
          if (i != 0) {}
        }
        finally
        {
          if (bool) {
            a(localf1, true);
          }
        }
      }
    }
    localg.z();
    try
    {
      e locale = localf1.n();
      localg.a(new bb(locale).l());
      ld localld = a(localg, locale);
      if (i == 0) {
        if (localld == localf1)
        {
          a(localf1, paramp_, paramq_);
          if (i != 0) {
            return;
          }
          if (!f.Vb) {
            break label209;
          }
        }
      }
      if ((i != 0) || ((localld instanceof f)))
      {
        f localf2 = (f)localld;
        ArrayList localArrayList = new ArrayList();
        a(localf2, a(paramp_, localf2, localArrayList), a(paramq_, localf2, localArrayList));
      }
    }
    finally
    {
      label209:
      localg.A();
    }
  }
  
  private void a(f paramf, f.p_ paramp_, f.q_ paramq_)
  {
    int i = f.Wb;
    boolean bool4 = f.Vb;
    boolean bool1 = b(paramf);
    if (bool1) {
      a(paramf, false);
    }
    try
    {
      bb localbb1 = new bb();
      h localh1 = new h();
      Rectangle2D localRectangle2D = paramp_.h();
      a(paramf.n(), localRectangle2D, localbb1, localh1);
      double d1 = paramf.tb();
      bb localbb2 = new bb();
      h localh2 = new h();
      a(paramf.n(), new Rectangle2D.Double(paramf.a() + d1, paramf.b(), paramf.c() - d1, paramf.d()), localbb2, localh2);
      f.q_ localq_ = paramp_.a();
      double d2 = 0.0D;
      boolean bool2 = false;
      double d3 = 0.0D;
      if (i == 0) {
        if ((localq_ instanceof f.p_))
        {
          localObject1 = (f.p_)localq_;
          d2 = ((f.p_)localObject1).g();
          if (i == 0) {}
          bool2 = ((f.p_)localObject1).n() == 1;
        }
      }
      Object localObject1 = paramq_;
      double d4 = 0.0D;
      if ((i != 0) || ((localObject1 instanceof f.p_))) {
        d4 = ((f.p_)localObject1).g();
      }
      double d5 = paramp_.g();
      paramp_.a((f.q_)localObject1);
      double d6 = paramp_.g();
      if (i == 0) {
        if ((localq_ instanceof f.r_))
        {
          d3 = d5;
          if (i != 0) {
            break label313;
          }
          if (!bool4) {
            break label312;
          }
        }
      }
      if (i == 0) {
        if ((localq_ instanceof f.p_)) {
          d3 = d2 - ((f.p_)localq_).g();
        }
      }
      label312:
      label313:
      boolean bool3 = false;
      double d7 = 0.0D;
      if (i == 0) {
        if ((localObject1 instanceof f.r_)) {
          d7 = d6;
        }
      }
      if ((i != 0) || ((bool4) && ((i != 0) || ((localObject1 instanceof f.p_)))))
      {
        localObject2 = (f.p_)localObject1;
        d7 = ((f.p_)localObject2).g() - d4;
        if (i == 0) {}
        bool3 = ((f.p_)localObject2).n() == 1;
      }
      Object localObject2 = paramp_.h();
      a(paramf, localbb1, localh1, localObject1, d6, bool2, bool3, d3, d7, (Rectangle2D)localObject2, localRectangle2D, false);
      double d8 = paramf.tb();
      if (i == 0) {
        if (d8 != d1) {
          a(paramf, localbb2, localh2, d8 - d1, true);
        }
      }
    }
    finally
    {
      if (bool1) {
        a(paramf, true);
      }
    }
  }
  
  private void a(f paramf, bb parambb, h paramh, Object paramObject, double paramDouble1, boolean paramBoolean1, boolean paramBoolean2, double paramDouble2, double paramDouble3, Rectangle2D paramRectangle2D1, Rectangle2D paramRectangle2D2, boolean paramBoolean3)
  {
    int i = f.Wb;
    boolean bool = f.Vb;
    double d1 = a(paramRectangle2D1, paramBoolean3);
    double d2 = a(paramRectangle2D2, paramBoolean3);
    double d3 = b(paramRectangle2D1, paramBoolean3);
    double d4 = b(paramRectangle2D2, paramBoolean3);
    double d5 = a(paramf, paramBoolean3);
    bb localbb3;
    h localh2;
    h localh1;
    if (i == 0) {
      if (paramBoolean1)
      {
        if (i == 0) {
          if (paramBoolean2)
          {
            double d6 = b(a(paramObject, paramBoolean3), paramBoolean3) - paramDouble3;
            if (i == 0)
            {
              if (d1 > d2)
              {
                localbb3 = new bb();
                localh2 = new h();
                a(paramf, d6, d5 - d6, localbb3, localh2, paramBoolean3);
                a(paramf, localbb3, localh2, paramDouble3, paramBoolean3);
                a(paramf, parambb, paramh, d1 - d2, paramBoolean3);
                if (i == 0) {
                  if (!bool) {
                    return;
                  }
                }
              }
              else
              {
                a(paramf, parambb, paramh, d1 - d2, paramBoolean3);
              }
            }
            else
            {
              localbb3 = new bb();
              localh2 = new h();
              a(paramf, d6, d5 - d6, localbb3, localh2, paramBoolean3);
              a(paramf, localbb3, localh2, paramDouble3, paramBoolean3);
            }
            if ((i == 0) && (!bool)) {
              return;
            }
          }
        }
        bb localbb1;
        if (d1 > d2)
        {
          localbb1 = new bb();
          localh1 = new h();
          a(paramf, d1, d5 - d1, localbb1, localh1, paramBoolean3);
          a(paramf, localbb1, localh1, paramDouble1, paramBoolean3);
          a(paramf, parambb, paramh, d1 - d2, paramBoolean3);
          if (i == 0) {
            if (!bool) {
              return;
            }
          }
        }
        else
        {
          localbb1 = new bb();
          localh1 = new h();
          a(paramf, d1, d2 - d1, localbb1, localh1, paramBoolean3);
          a(paramf, parambb, paramh, d1 - d2, paramBoolean3);
          a(paramf, d3, d5 - d3, localbb1, localh1, paramBoolean3);
          a(paramf, localbb1, localh1, paramDouble1, paramBoolean3);
        }
        if ((i == 0) && (!bool)) {
          return;
        }
      }
    }
    if (i == 0) {
      if (paramBoolean2)
      {
        double d7 = b(a(paramObject, paramBoolean3), paramBoolean3) - paramDouble3;
        if (d1 > d2)
        {
          localbb3 = new bb();
          localh2 = new h();
          a(paramf, d4, d7 - d4 + paramDouble2, localbb3, localh2, paramBoolean3);
          a(paramf, localbb3, localh2, -paramDouble2, paramBoolean3);
          localbb3.clear();
          a(paramf, d7 + paramDouble2, d5 - d7, localbb3, localh2, paramBoolean3);
          a(paramf, localbb3, localh2, paramDouble3 - paramDouble2, paramBoolean3);
          a(paramf, parambb, paramh, d1 - d2, paramBoolean3);
          if (i == 0) {
            if (!bool) {
              return;
            }
          }
        }
        else
        {
          localbb3 = new bb();
          localh2 = new h();
          a(paramf, d7, d2 - d7, localbb3, localh2, paramBoolean3);
          a(paramf, localbb3, localh2, paramDouble3, paramBoolean3);
          a(paramf, parambb, paramh, d1 - d2, paramBoolean3);
          localbb3.clear();
          a(paramf, d4, d5 + paramDouble2 - paramDouble3 - d4, localbb3, localh2, paramBoolean3);
          a(paramf, localbb3, localh2, paramDouble3 - paramDouble2, paramBoolean3);
        }
        if ((i == 0) && (!bool)) {
          return;
        }
      }
    }
    bb localbb2;
    if (d1 > d2)
    {
      localbb2 = new bb();
      localh1 = new h();
      a(paramf, d4, d3 - d4, localbb2, localh1, paramBoolean3);
      a(paramf, parambb, paramh, d1 - d2, paramBoolean3);
      a(paramf, localbb2, localh1, -paramDouble1, paramBoolean3);
      if (i == 0) {
        if (!bool) {
          return;
        }
      }
    }
    else
    {
      localbb2 = new bb();
      localh1 = new h();
      a(paramf, d1, d2 - d1, localbb2, localh1, paramBoolean3);
      a(paramf, localbb2, localh1, paramDouble1, paramBoolean3);
    }
    a(paramf, parambb, paramh, d1 - d2, paramBoolean3);
  }
  
  private static double a(Rectangle2D paramRectangle2D, boolean paramBoolean)
  {
    if (paramBoolean) {
      return paramRectangle2D.getX();
    }
    return paramRectangle2D.getY();
  }
  
  private static double b(Rectangle2D paramRectangle2D, boolean paramBoolean)
  {
    if (paramBoolean) {
      return paramRectangle2D.getMaxX();
    }
    return paramRectangle2D.getMaxY();
  }
  
  private static double a(ld paramld, boolean paramBoolean)
  {
    if (paramBoolean) {
      return paramld.a() + paramld.c();
    }
    return paramld.b() + paramld.d();
  }
  
  private static Rectangle2D a(Object paramObject, boolean paramBoolean)
  {
    if (paramBoolean) {
      return ((f.n_)paramObject).h();
    }
    return ((f.p_)paramObject).h();
  }
  
  private void a(f paramf, double paramDouble1, double paramDouble2, bb parambb, h paramh, boolean paramBoolean)
  {
    int i = f.Wb;
    if (i == 0)
    {
      if (paramBoolean)
      {
        if (i != 0) {
          break label83;
        }
        a(paramf.n(), new Rectangle2D.Double(paramDouble1, paramf.b(), paramDouble2, paramf.d()), parambb, paramh);
      }
    }
    else if (!f.Vb) {
      return;
    }
    label83:
    a(paramf.n(), new Rectangle2D.Double(paramf.a(), paramDouble1, paramf.c(), paramDouble2), parambb, paramh);
  }
  
  private void a(f paramf, bb parambb, h paramh, double paramDouble, boolean paramBoolean)
  {
    int i = f.Wb;
    boolean bool = f.Vb;
    h localh = new h();
    g localg = a(paramf);
    localg.z();
    try
    {
      localg.a(parambb.l());
      HashSet localHashSet = new HashSet();
      ab localab = new ab();
      HashMap localHashMap = new HashMap();
      localHashMap.put(null, null);
      Object localObject1 = paramh.m();
      Object localObject2;
      Object localObject3;
      do
      {
        if (!((fb)localObject1).e()) {
          break;
        }
        localObject2 = ((fb)localObject1).a();
        localHashSet.add(localObject2);
        localObject3 = ((eb)localObject2).a();
        if ((i == 0) && (bool)) {
          break label190;
        }
        if (i == 0)
        {
          if (!localHashMap.containsKey(localObject3))
          {
            localHashMap.put(localObject3, localg.t((d)localObject3));
            localab.add(localObject3);
          }
          ((fb)localObject1).f();
        }
      } while (!bool);
      if (i == 0) {
        localg.a(localab.l());
      }
      label190:
      localObject1 = localab.l();
      label255:
      do
      {
        do
        {
          if (!((a.c.m)localObject1).e()) {
            break;
          }
          break label255;
          localObject2 = ((a.c.m)localObject1).a();
          localObject3 = localg.t((d)localObject2).o();
          if (bool) {
            break label352;
          }
          fb localfb = ((tb)localHashMap.get(localObject2)).o();
          do
          {
            if (!localfb.e()) {
              break label325;
            }
            if (bool) {
              break;
            }
            if (!((fb)localObject3).e()) {
              break label325;
            }
            if (i == 0)
            {
              if (localHashSet.contains(localfb.a())) {
                localh.add(((fb)localObject3).a());
              }
              localfb.f();
              ((fb)localObject3).f();
            }
          } while (!bool);
          ((a.c.m)localObject1).f();
        } while (i != 0);
      } while (!bool);
      label325:
      if (i != 0) {}
    }
    finally
    {
      label352:
      localg.A();
    }
    if (i == 0)
    {
      if (paramBoolean)
      {
        if (i != 0) {
          break label406;
        }
        a(localg, parambb, localh, paramDouble, 0.0D);
      }
    }
    else if (!bool) {
      return;
    }
    label406:
    a(localg, parambb, localh, 0.0D, paramDouble);
  }
  
  public void a(f.n_ paramn_, int paramInt)
  {
    int j = f.Wb;
    boolean bool = f.Vb;
    f localf1 = f.d(paramn_);
    g localg = a(localf1);
    int i = paramn_.b();
    if (i != paramInt)
    {
      if (j == 0) {
        if (localg == null)
        {
          paramn_.a(paramInt);
          if (j != 0) {
            break label68;
          }
          if (!bool) {
            return;
          }
        }
      }
      localg.z();
      try
      {
        label68:
        e locale = localf1.n();
        localg.a(new bb(locale).l());
        ld localld = a(localg, locale);
        if (j == 0) {
          if (localld == localf1)
          {
            a(localf1, paramn_, i, paramInt);
            if (j != 0) {
              return;
            }
            if (!bool) {
              break label165;
            }
          }
        }
        if ((j != 0) || ((localld instanceof f)))
        {
          f localf2 = (f)localld;
          a(localf2, a(paramn_, localf2), i, paramInt);
        }
      }
      finally
      {
        label165:
        localg.A();
      }
    }
  }
  
  private void a(f paramf, f.n_ paramn_, int paramInt1, int paramInt2)
  {
    boolean bool = b(paramf);
    if (bool) {
      a(paramf, false);
    }
    try
    {
      Rectangle2D localRectangle2D = paramn_.h();
      paramn_.a(paramInt2);
      a(paramf, paramn_.g(), paramInt1, paramInt2, localRectangle2D, paramn_.h(), true);
      if (f.Wb != 0) {}
    }
    finally
    {
      if (bool) {
        a(paramf, bool);
      }
    }
  }
  
  public void a(f.p_ paramp_, int paramInt)
  {
    int j = f.Wb;
    boolean bool = f.Vb;
    f localf1 = f.d(paramp_);
    g localg = a(localf1);
    int i = paramp_.b();
    if (i != paramInt)
    {
      if (j == 0) {
        if (localg == null)
        {
          paramp_.a(paramInt);
          if (j != 0) {
            break label68;
          }
          if (!bool) {
            return;
          }
        }
      }
      localg.z();
      try
      {
        label68:
        e locale = localf1.n();
        localg.a(new bb(locale).l());
        ld localld = a(localg, locale);
        if (j == 0) {
          if (localld == localf1)
          {
            a(localf1, paramp_, i, paramInt);
            if (j != 0) {
              return;
            }
            if (!bool) {
              break label165;
            }
          }
        }
        if ((j != 0) || ((localld instanceof f)))
        {
          f localf2 = (f)localld;
          a(localf2, a(paramp_, localf2), i, paramInt);
        }
      }
      finally
      {
        label165:
        localg.A();
      }
    }
  }
  
  private void a(f paramf, f.p_ paramp_, int paramInt1, int paramInt2)
  {
    boolean bool = b(paramf);
    if (bool) {
      a(paramf, false);
    }
    try
    {
      Rectangle2D localRectangle2D = paramp_.h();
      paramp_.a(paramInt2);
      a(paramf, paramp_.g(), paramInt1, paramInt2, localRectangle2D, paramp_.h(), false);
      if (f.Wb != 0) {}
    }
    finally
    {
      if (bool) {
        a(paramf, bool);
      }
    }
  }
  
  private void a(f paramf, double paramDouble, int paramInt1, int paramInt2, Rectangle2D paramRectangle2D1, Rectangle2D paramRectangle2D2, boolean paramBoolean)
  {
    int i = f.Wb;
    double d1 = a(paramRectangle2D2, paramBoolean);
    double d2 = a(paramRectangle2D1, paramBoolean);
    double d3 = b(paramRectangle2D1, paramBoolean);
    double d4 = b(paramRectangle2D2, paramBoolean);
    bb localbb1 = new bb();
    h localh1 = new h();
    a(paramf.n(), paramRectangle2D1, localbb1, localh1);
    bb localbb2;
    h localh2;
    if (i == 0) {
      if (paramInt2 > paramInt1)
      {
        localbb2 = new bb();
        localh2 = new h();
        a(paramf.n(), a(paramRectangle2D1, d3, d4 - d3, paramBoolean), localbb2, localh2);
        a(paramf, localbb2, localh2, -paramDouble, paramBoolean);
        if (i != 0) {
          return;
        }
      }
    }
    if ((f.Vb) && (paramInt2 < paramInt1))
    {
      localbb2 = new bb();
      localh2 = new h();
      a(paramf.n(), a(paramRectangle2D1, d1, d2 - d1, paramBoolean), localbb2, localh2);
      a(paramf, localbb2, localh2, paramDouble, paramBoolean);
    }
    a(paramf, localbb1, localh1, d1 - d2, paramBoolean);
  }
  
  private static Rectangle2D a(Rectangle2D paramRectangle2D, double paramDouble1, double paramDouble2, boolean paramBoolean)
  {
    if (paramBoolean) {
      return new Rectangle2D.Double(paramDouble1, paramRectangle2D.getY(), paramDouble2, paramRectangle2D.getHeight());
    }
    return new Rectangle2D.Double(paramRectangle2D.getX(), paramDouble1, paramRectangle2D.getWidth(), paramDouble2);
  }
  
  public f.n_ a(f.o_ paramo_, int paramInt)
  {
    int i = f.Wb;
    f localf = f.a(paramo_);
    g localg = a(localf);
    if (i == 0) {
      if (localg == null) {
        return a(localf, paramo_, paramInt);
      }
    }
    localg.z();
    try
    {
      e locale = localf.n();
      localg.a(new bb(locale).l());
      ld localld = a(localg, locale);
      Object localObject1;
      if (i == 0) {
        if (localld == localf)
        {
          localObject1 = a(localf, paramo_, paramInt);
          return localObject1;
        }
      }
      if ((i != 0) || ((localld instanceof f)))
      {
        localObject1 = (f)localld;
        f.n_ localn_ = a((f)localObject1, a(paramo_, (f)localObject1), paramInt);
        return localn_;
      }
      throw new IllegalStateException();
    }
    finally
    {
      localg.A();
    }
  }
  
  private f.n_ a(f paramf, f.o_ paramo_, int paramInt)
  {
    int i = f.Wb;
    boolean bool = b(paramf);
    if (bool) {
      a(paramf, false);
    }
    try
    {
      double d1 = paramf.a() + paramf.c();
      double d2 = paramf.rb();
      double d3 = (i != 0) || ((paramo_ instanceof f.n_)) ? ((f.n_)paramo_).g() : 0.0D;
      f.n_ localn_ = paramo_.b(paramInt);
      double d4 = (i != 0) || ((paramo_ instanceof f.n_)) ? ((f.n_)paramo_).g() : 0.0D;
      double d5 = paramf.rb();
      if (a(paramf) != null)
      {
        Object localObject2;
        h localh;
        if (paramo_.k() > 1)
        {
          localObject1 = localn_.h();
          localObject2 = new bb();
          localh = new h();
          a(paramf.n(), new Rectangle2D.Double(((Rectangle2D)localObject1).getX(), paramf.b(), d1 - ((Rectangle2D)localObject1).getX(), paramf.d()), (Collection)localObject2, localh);
          a(paramf, (bb)localObject2, localh, localn_.g(), true);
          if (i != 0) {
            break label309;
          }
          if (!f.Vb) {}
        }
        else
        {
          localObject1 = localn_.h();
          localObject2 = new bb();
          localh = new h();
          a(paramf.n(), new Rectangle2D.Double(((Rectangle2D)localObject1).getMaxX(), paramf.b(), d1 - ((Rectangle2D)localObject1).getMaxX(), paramf.d()), (Collection)localObject2, localh);
          a(paramf, (bb)localObject2, localh, d4 - d3, true);
        }
        if (d5 != d2)
        {
          label309:
          localObject1 = new bb();
          localObject2 = new h();
          a(paramf.n(), new Rectangle2D.Double(paramf.a(), paramf.b() + d2, paramf.c(), paramf.d() - d2), (Collection)localObject1, (Collection)localObject2);
          a(paramf, (bb)localObject1, (h)localObject2, d5 - d2, false);
        }
      }
      Object localObject1 = localn_;
      return localObject1;
    }
    finally
    {
      if (bool) {
        a(paramf, bool);
      }
    }
  }
  
  public f.p_ a(f.q_ paramq_, int paramInt)
  {
    int i = f.Wb;
    f localf = f.a(paramq_);
    g localg = a(localf);
    if (i == 0) {
      if (localg == null) {
        return a(localf, paramq_, paramInt);
      }
    }
    localg.z();
    try
    {
      e locale = localf.n();
      localg.a(new bb(locale).l());
      ld localld = a(localg, locale);
      Object localObject1;
      if (i == 0) {
        if (localld == localf)
        {
          localObject1 = a(localf, paramq_, paramInt);
          return localObject1;
        }
      }
      if ((i != 0) || ((localld instanceof f)))
      {
        localObject1 = (f)localld;
        f.p_ localp_ = a((f)localObject1, a(paramq_, (f)localObject1), paramInt);
        return localp_;
      }
      throw new IllegalStateException();
    }
    finally
    {
      localg.A();
    }
  }
  
  private f.p_ a(f paramf, f.q_ paramq_, int paramInt)
  {
    int i = f.Wb;
    boolean bool = b(paramf);
    if (bool) {
      a(paramf, false);
    }
    try
    {
      double d1 = paramf.b() + paramf.d();
      double d2 = paramf.tb();
      double d3 = (i != 0) || ((paramq_ instanceof f.p_)) ? ((f.p_)paramq_).g() : 0.0D;
      f.p_ localp_ = paramq_.d(paramInt);
      double d4 = (i != 0) || ((paramq_ instanceof f.p_)) ? ((f.p_)paramq_).g() : 0.0D;
      double d5 = paramf.tb();
      if (a(paramf) != null)
      {
        Object localObject2;
        h localh;
        if (paramq_.n() > 1)
        {
          localObject1 = localp_.h();
          localObject2 = new bb();
          localh = new h();
          a(paramf.n(), new Rectangle2D.Double(paramf.a(), ((Rectangle2D)localObject1).getY(), paramf.c(), d1 - ((Rectangle2D)localObject1).getY()), (Collection)localObject2, localh);
          a(paramf, (bb)localObject2, localh, localp_.g(), false);
          if (i != 0) {
            break label309;
          }
          if (!f.Vb) {}
        }
        else
        {
          localObject1 = localp_.h();
          localObject2 = new bb();
          localh = new h();
          a(paramf.n(), new Rectangle2D.Double(paramf.a(), ((Rectangle2D)localObject1).getMaxY(), paramf.c(), d1 - ((Rectangle2D)localObject1).getMaxY()), (Collection)localObject2, localh);
          a(paramf, (bb)localObject2, localh, d4 - d3, false);
        }
        if (d5 != d2)
        {
          label309:
          localObject1 = new bb();
          localObject2 = new h();
          a(paramf.n(), new Rectangle2D.Double(paramf.a() + d2, paramf.b(), paramf.c() - d2, paramf.d()), (Collection)localObject1, (Collection)localObject2);
          a(paramf, (bb)localObject1, (h)localObject2, d5 - d2, true);
        }
      }
      Object localObject1 = localp_;
      return localObject1;
    }
    finally
    {
      if (bool) {
        a(paramf, bool);
      }
    }
  }
  
  public boolean a(f.p_ paramp_, double paramDouble, boolean paramBoolean)
  {
    int i = f.Wb;
    boolean bool = f.Vb;
    f localf1 = f.d(paramp_);
    double d = a(paramp_);
    if ((i != 0) || (d > paramDouble)) {
      return false;
    }
    g localg = a(localf1);
    if (i == 0) {
      if (localg == null)
      {
        a(localf1, paramp_, paramDouble, paramBoolean);
        if (i != 0) {
          break label217;
        }
        if (!bool) {
          break label216;
        }
      }
    }
    localg.z();
    try
    {
      e locale = localf1.n();
      localg.a(new bb(locale).l());
      ld localld = a(localg, locale);
      if (i == 0) {
        if (localld == localf1)
        {
          a(localf1, paramp_, paramDouble, paramBoolean);
          if (i != 0) {
            break label203;
          }
          if (!bool) {
            break label198;
          }
        }
      }
      if ((i != 0) || ((localld instanceof f)))
      {
        f localf2 = (f)localld;
        a(localf2, a(paramp_, localf2), paramDouble, paramBoolean);
        if (i != 0) {
          break label203;
        }
        if (!bool) {}
      }
      else
      {
        throw new IllegalStateException();
      }
    }
    finally
    {
      label198:
      label203:
      localg.A();
    }
    label216:
    label217:
    return true;
  }
  
  private void a(f paramf, f.p_ paramp_, double paramDouble, boolean paramBoolean)
  {
    int i = f.Wb;
    boolean bool3 = f.Vb;
    boolean bool1 = b(paramf);
    if (bool1) {
      a(paramf, false);
    }
    try
    {
      double d1 = paramDouble - paramp_.g();
      Rectangle2D localRectangle2D = paramp_.h();
      Object localObject1 = paramp_;
      Object localObject2;
      do
      {
        do
        {
          if (!(localObject1 instanceof f.p_)) {
            break;
          }
          localObject2 = (f.p_)localObject1;
          ((f.p_)localObject2).b(((f.p_)localObject2).g() + d1);
          localObject1 = ((f.p_)localObject2).a();
        } while (!bool3);
        localObject2 = new bb();
      } while (i != 0);
      double d2 = paramBoolean ? localRectangle2D.getY() : localRectangle2D.getY() + localRectangle2D.getHeight();
      h localh = new h();
      a(paramf.n(), new Rectangle2D.Double(paramf.a(), d2, paramf.c(), paramf.d() - d2 + paramf.b()), (Collection)localObject2, localh);
      a(paramf, (bb)localObject2, localh, d1, false);
      boolean bool2 = paramf.Z();
      paramf.g(false);
      paramf.a(paramf.a(), paramf.b(), paramf.c(), paramf.d() + d1);
      paramf.g(bool2);
      if (i != 0) {}
    }
    finally
    {
      if (bool1) {
        a(paramf, bool1);
      }
    }
  }
  
  double a(f.p_ paramp_)
  {
    int i = f.Wb;
    boolean bool = f.Vb;
    double d1 = paramp_.g() - paramp_.f();
    Object localObject = paramp_;
    do
    {
      if (!(localObject instanceof f.p_)) {
        break;
      }
      f.p_ localp_1 = (f.p_)localObject;
      u localu = localp_1.i();
      Iterator localIterator = localp_1.o().iterator();
      if (bool) {
        break label225;
      }
      double d2 = 0.0D;
      if (localIterator.hasNext()) {}
      for (;;)
      {
        if (i == 0)
        {
          f.p_ localp_2 = (f.p_)localIterator.next();
          d2 += localp_2.g();
          if (!bool)
          {
            if (!bool) {
              break;
            }
            if (i != 0) {
              continue;
            }
            if (localu != null) {
              d2 += localu.b + localu.d;
            }
          }
        }
      }
      if (i == 0)
      {
        if (localp_1 != paramp_) {
          d2 -= d1;
        }
        d2 = Math.max(localp_1.f(), d2);
        d1 = Math.max(0.0D, Math.min(d1, localp_1.g() - d2));
      }
      localObject = localp_1.a();
    } while (!bool);
    if (i == 0) {}
    label225:
    return paramp_.g() - d1;
  }
  
  public boolean a(f.n_ paramn_, double paramDouble, boolean paramBoolean)
  {
    int i = f.Wb;
    boolean bool = f.Vb;
    f localf1 = f.d(paramn_);
    double d = a(paramn_);
    if ((i != 0) || (d > paramDouble)) {
      return false;
    }
    g localg = a(localf1);
    if (i == 0) {
      if (localg == null)
      {
        a(localf1, paramn_, paramDouble, paramBoolean);
        if (i != 0) {
          break label217;
        }
        if (!bool) {
          break label216;
        }
      }
    }
    localg.z();
    try
    {
      e locale = localf1.n();
      localg.a(new bb(locale).l());
      ld localld = a(localg, locale);
      if (i == 0) {
        if (localld == localf1)
        {
          a(localf1, paramn_, paramDouble, paramBoolean);
          if (i != 0) {
            break label203;
          }
          if (!bool) {
            break label198;
          }
        }
      }
      if ((i != 0) || ((localld instanceof f)))
      {
        f localf2 = (f)localld;
        a(localf2, a(paramn_, localf2), paramDouble, paramBoolean);
        if (i != 0) {
          break label203;
        }
        if (!bool) {}
      }
      else
      {
        throw new IllegalStateException();
      }
    }
    finally
    {
      label198:
      label203:
      localg.A();
    }
    label216:
    label217:
    return true;
  }
  
  private void a(f paramf, f.n_ paramn_, double paramDouble, boolean paramBoolean)
  {
    int i = f.Wb;
    boolean bool3 = f.Vb;
    boolean bool1 = b(paramf);
    if (bool1) {
      a(paramf, false);
    }
    try
    {
      double d1 = paramDouble - paramn_.g();
      Rectangle2D localRectangle2D = paramn_.h();
      Object localObject1 = paramn_;
      Object localObject2;
      do
      {
        do
        {
          if (!(localObject1 instanceof f.n_)) {
            break;
          }
          localObject2 = (f.n_)localObject1;
          ((f.n_)localObject2).b(((f.n_)localObject2).g() + d1);
          localObject1 = ((f.n_)localObject2).a();
        } while (!bool3);
        localObject2 = new bb();
      } while (i != 0);
      double d2 = paramBoolean ? localRectangle2D.getX() : localRectangle2D.getX() + localRectangle2D.getWidth();
      h localh = new h();
      a(paramf.n(), new Rectangle2D.Double(d2, paramf.b(), paramf.c() - d2 + paramf.a(), paramf.d()), (Collection)localObject2, localh);
      a(paramf, (bb)localObject2, localh, d1, true);
      boolean bool2 = paramf.Z();
      paramf.g(false);
      paramf.a(paramf.a(), paramf.b(), paramf.c() + d1, paramf.d());
      paramf.g(bool2);
      if (i != 0) {}
    }
    finally
    {
      if (bool1) {
        a(paramf, bool1);
      }
    }
  }
  
  double a(f.n_ paramn_)
  {
    int i = f.Wb;
    boolean bool = f.Vb;
    double d1 = paramn_.g() - paramn_.f();
    Object localObject = paramn_;
    do
    {
      if (!(localObject instanceof f.n_)) {
        break;
      }
      f.n_ localn_1 = (f.n_)localObject;
      u localu = localn_1.i();
      Iterator localIterator = localn_1.l().iterator();
      if (bool) {
        break label225;
      }
      double d2 = 0.0D;
      if (localIterator.hasNext()) {}
      for (;;)
      {
        if (i == 0)
        {
          f.n_ localn_2 = (f.n_)localIterator.next();
          d2 += localn_2.g();
          if (!bool)
          {
            if (!bool) {
              break;
            }
            if (i != 0) {
              continue;
            }
            if (localu != null) {
              d2 += localu.c + localu.e;
            }
          }
        }
      }
      if (i == 0)
      {
        if (localn_1 != paramn_) {
          d2 -= d1;
        }
        d2 = Math.max(localn_1.f(), d2);
        d1 = Math.max(0.0D, Math.min(d1, localn_1.g() - d2));
      }
      localObject = localn_1.a();
    } while (!bool);
    if (i == 0) {}
    label225:
    return paramn_.g() - d1;
  }
  
  public boolean a()
  {
    return this.a;
  }
  
  public void a(boolean paramBoolean)
  {
    this.a = paramBoolean;
  }
  
  static f.n_ a(f.n_ paramn_, f paramf)
  {
    return a(paramn_, paramf, new ArrayList());
  }
  
  static f.n_ a(f.n_ paramn_, f paramf, List paramList)
  {
    int i = f.Wb;
    boolean bool = f.Vb;
    paramList.clear();
    paramList.add(paramn_);
    f.o_ localo_ = paramn_.a();
    if ((localo_ instanceof f.n_)) {}
    Object localObject;
    do
    {
      paramList.add(localo_);
      localo_ = ((f.n_)localo_).a();
      if (!bool) {
        break;
      }
      localObject = paramf.eb();
    } while (i != 0);
    ListIterator localListIterator = paramList.listIterator(paramList.size());
    if (localListIterator.hasPrevious()) {}
    while (i != 0)
    {
      f.n_ localn_ = (f.n_)localListIterator.previous();
      if (bool) {
        break label144;
      }
      localObject = ((f.o_)localObject).c(localn_.b());
      if (!bool) {
        break;
      }
    }
    label144:
    return (f.n_)localObject;
  }
  
  static f.o_ a(f.o_ paramo_, f paramf)
  {
    return a(paramo_, paramf, new ArrayList());
  }
  
  static f.o_ a(f.o_ paramo_, f paramf, List paramList)
  {
    if (f.Wb == 0) {
      if ((paramo_ instanceof f.r_)) {
        return paramf.eb();
      }
    }
    return a((f.n_)paramo_, paramf, paramList);
  }
  
  static f.p_ a(f.p_ paramp_, f paramf)
  {
    return a(paramp_, paramf, new ArrayList());
  }
  
  static f.p_ a(f.p_ paramp_, f paramf, List paramList)
  {
    int i = f.Wb;
    boolean bool = f.Vb;
    paramList.clear();
    paramList.add(paramp_);
    f.q_ localq_ = paramp_.a();
    if ((localq_ instanceof f.p_)) {}
    Object localObject;
    do
    {
      paramList.add(localq_);
      localq_ = ((f.p_)localq_).a();
      if (!bool) {
        break;
      }
      localObject = paramf.eb();
    } while (i != 0);
    ListIterator localListIterator = paramList.listIterator(paramList.size());
    if (localListIterator.hasPrevious()) {}
    while (i != 0)
    {
      f.p_ localp_ = (f.p_)localListIterator.previous();
      if (bool) {
        break label144;
      }
      localObject = ((f.q_)localObject).e(localp_.b());
      if (!bool) {
        break;
      }
    }
    label144:
    return (f.p_)localObject;
  }
  
  static f.q_ a(f.q_ paramq_, f paramf)
  {
    return a(paramq_, paramf, new ArrayList());
  }
  
  static f.q_ a(f.q_ paramq_, f paramf, List paramList)
  {
    if (f.Wb == 0) {
      if ((paramq_ instanceof f.r_)) {
        return paramf.eb();
      }
    }
    return a((f.p_)paramq_, paramf, paramList);
  }
  
  static ld a(g paramg, e parame)
  {
    ld localld = paramg.w(parame);
    if (f.Wb == 0) {
      if ((localld instanceof qd)) {
        return ((qd)localld).i();
      }
    }
    return localld;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.b.m

 * JD-Core Version:    0.7.0.1

 */